package com.gloaba.resource.api.service;

import com.gloaba.common.core.domain.R;
import com.gloaba.resource.api.domain.SysFile;
import com.gloaba.resource.api.domain.UploadFileVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "fileRemoteService", value = "oceania-resource", url = "${feign.servers.oceania-resource.url:}"
        //, fallbackFactory = FileRemoteFallbackFactory.class
        )
public interface FileRemoteService {

    /**
     * 上传文件
     * @return 结果
     */
    @PostMapping("/feign/resource/oss/upload")
    R<SysFile> upload(@RequestBody UploadFileVo uploadFileVo);

//    /**
//     * 通过ossId查询对应的url
//     * @param ids ossId串逗号分隔
//     * @return url串逗号分隔
//     */
//    @GetMapping("/feign/resource/file/list")
//    String selectUrlByIds(String ids);
}
